// @flow
import Loadable from 'react-loadable';
import DefaultLoading from 'src/components/layout/DefaultLoading';
// const defaultOpts = {
//   delay: 300,
//   loading: DefaultLoading,
//   timeout: 10000,
// };

const dynamicImport = (compent: any) => (
  // console.log( opts);
  Loadable({
    loader: compent,
    loading: DefaultLoading,
  } as any )
);

export default dynamicImport;